<template>
    <div class="header">
      <router-link class="logo" to="/home">
        <img src="/static/images/logo/logo2.png" alt="">
      </router-link>
      <div class="person">
        <el-avatar class="avatar" :size="size" :src="circleUrl"></el-avatar>
        <span class="user-name">18794406462</span>
        <router-link class="exit" to="/home">[安全退出]</router-link>
      </div>
    </div>
</template>

<script>
export default {
  name: 'HeaderComponent',
  data () {
    return {
      circleUrl: '/static/images/avatar/icon-avatar.png',
      squareUrl: 'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png',
      size: 'medium'
    }
  }
}
</script>

<style scoped>
  .header{
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .logo{
    width: 30%;
    min-width: 300px;
    float: left;
  }
  .person{
    float: left;
    width: 70%;
    min-width: 700px;
    margin: 10px 0;
    display: flex;
    justify-content: flex-end;
  }
  .avatar{
    display: block;
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
  .user-name{
    display:block;
    line-height: 40px
  }
  .exit{
    width: 100px;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    color: #999;
  }
</style>
